-
-
Notifications
You must be signed in to change notification settings - Fork 751
feat: expose all run options in the test run page #2227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
WalkthroughThis set of changes introduces new UI components and extends existing ones to support enhanced task execution configuration and queue management within a web application. New primitives such as 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (3)
✅ Files skipped from review due to trivial changes (1)
🧰 Additional context used📓 Path-based instructions (5)`apps/webapp/**/*.ts`: In the webapp, all environment variables must be accessed through the `env` export of `env.server.ts`, instead of directly accessing `process.env`.
📄 Source: CodeRabbit Inference Engine (.cursor/rules/webapp.mdc) List of files the instruction was applied to:
`apps/webapp/**/*.{ts,tsx}`: When importing from `@trigger.dev/core` in the weba...
📄 Source: CodeRabbit Inference Engine (.cursor/rules/webapp.mdc) List of files the instruction was applied to:
`**/*.{ts,tsx}`: Always prefer using isomorphic code like fetch, ReadableStream,...
📄 Source: CodeRabbit Inference Engine (.github/copilot-instructions.md) List of files the instruction was applied to:
`{packages/core,apps/webapp}/**/*.{ts,tsx}`: We use zod a lot in packages/core and in the webapp
📄 Source: CodeRabbit Inference Engine (.github/copilot-instructions.md) List of files the instruction was applied to:
`**/*.tsx`: When using React hooks for realtime updates, use `@trigger.dev/react-hooks` and provide a Public Access Token via context or props.
📄 Source: CodeRabbit Inference Engine (.cursor/rules/writing-tasks.mdc) List of files the instruction was applied to:
🧠 Learnings (3)📓 Common learnings
apps/webapp/app/presenters/v3/TestTaskPresenter.server.ts (18)
apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.test.tasks.$taskParam/route.tsx (21)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (25)
🔇 Additional comments (13)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Run numbers will soon get deprecated due to contention issues
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
🧹 Nitpick comments (4)
apps/webapp/app/components/runs/v3/RunTagInput.tsx (1)
71-73
: Consider clarifying the comma key handling.The comma key is prevented but not used for tag creation. Consider either using comma as a delimiter or adding a comment explaining why it's blocked.
} else if (e.key === ",") { e.preventDefault(); + // Prevent comma input to avoid confusion with form submission format }
apps/webapp/app/v3/testTask.ts (1)
60-84
: Consider documenting the zero-to-undefined transform behavior.The pattern of transforming
0
toundefined
for duration fields is repeated across multiple fields. While this appears intentional to distinguish "not set" from "explicitly set to 0", this implicit behavior could be confusing for API consumers.Consider adding a comment explaining this behavior or handling it explicitly in the UI layer instead.
apps/webapp/app/presenters/v3/TestTaskPresenter.server.ts (1)
148-166
: Consider making the version limit configurable.The hardcoded limit of 20 versions might need adjustment in the future. Consider extracting this as a constant or configuration value for easier maintenance.
+const MAX_RECENT_VERSIONS = 20; + const backgroundWorkers = await this.#prismaClient.backgroundWorker.findMany({ where: { runtimeEnvironmentId: environment.id, }, select: { version: true, engine: true, }, orderBy: { createdAt: "desc", }, - take: 20, // last 20 versions should suffice + take: MAX_RECENT_VERSIONS, });apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.test.tasks.$taskParam/route.tsx (1)
172-197
: Consider extracting queue fetching logic and handling loading states.The queue fetching logic could benefit from:
- Extracting the URL construction to a utility function
- Adding loading state handling for better UX
+import { buildQueuesResourceUrl } from "~/utils/resourceUrls"; + const params = useParams(); const queueFetcher = useFetcher<typeof queuesLoader>(); useEffect(() => { if (params.organizationSlug && params.projectParam && params.envParam) { - const searchParams = new URLSearchParams(); - searchParams.set("type", "custom"); - searchParams.set("per_page", "100"); - - queueFetcher.load( - `/resources/orgs/${params.organizationSlug}/projects/${params.projectParam}/env/${ - params.envParam - }/queues?${searchParams.toString()}` - ); + const url = buildQueuesResourceUrl(params, { type: "custom", per_page: "100" }); + queueFetcher.load(url); } }, [params.organizationSlug, params.projectParam, params.envParam]);Also consider showing a loading indicator while fetching queues.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (13)
apps/webapp/app/components/primitives/DurationPicker.tsx
(1 hunks)apps/webapp/app/components/primitives/Label.tsx
(1 hunks)apps/webapp/app/components/primitives/Select.tsx
(2 hunks)apps/webapp/app/components/runs/v3/RunTag.tsx
(3 hunks)apps/webapp/app/components/runs/v3/RunTagInput.tsx
(1 hunks)apps/webapp/app/presenters/v3/QueueListPresenter.server.ts
(6 hunks)apps/webapp/app/presenters/v3/QueueRetrievePresenter.server.ts
(1 hunks)apps/webapp/app/presenters/v3/TestTaskPresenter.server.ts
(7 hunks)apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.test.tasks.$taskParam/route.tsx
(10 hunks)apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.queues.ts
(1 hunks)apps/webapp/app/v3/models/workerDeployment.server.ts
(1 hunks)apps/webapp/app/v3/services/testTask.server.ts
(3 hunks)apps/webapp/app/v3/testTask.ts
(2 hunks)
🧰 Additional context used
📓 Path-based instructions (5)
`apps/webapp/**/*.{ts,tsx}`: When importing from `@trigger.dev/core` in the weba...
apps/webapp/**/*.{ts,tsx}
: When importing from@trigger.dev/core
in the webapp, never import from the root@trigger.dev/core
path; always use one of the subpath exports as defined in the package's package.json.
📄 Source: CodeRabbit Inference Engine (.cursor/rules/webapp.mdc)
List of files the instruction was applied to:
apps/webapp/app/components/primitives/Label.tsx
apps/webapp/app/presenters/v3/QueueRetrievePresenter.server.ts
apps/webapp/app/v3/models/workerDeployment.server.ts
apps/webapp/app/components/primitives/Select.tsx
apps/webapp/app/components/primitives/DurationPicker.tsx
apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.queues.ts
apps/webapp/app/v3/services/testTask.server.ts
apps/webapp/app/components/runs/v3/RunTagInput.tsx
apps/webapp/app/components/runs/v3/RunTag.tsx
apps/webapp/app/presenters/v3/QueueListPresenter.server.ts
apps/webapp/app/v3/testTask.ts
apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.test.tasks.$taskParam/route.tsx
apps/webapp/app/presenters/v3/TestTaskPresenter.server.ts
`**/*.tsx`: When using React hooks for realtime updates, use `@trigger.dev/react-hooks` and provide a Public Access Token via context or props.
**/*.tsx
: When using React hooks for realtime updates, use@trigger.dev/react-hooks
and provide a Public Access Token via context or props.
📄 Source: CodeRabbit Inference Engine (.cursor/rules/writing-tasks.mdc)
List of files the instruction was applied to:
apps/webapp/app/components/primitives/Label.tsx
apps/webapp/app/components/primitives/Select.tsx
apps/webapp/app/components/primitives/DurationPicker.tsx
apps/webapp/app/components/runs/v3/RunTagInput.tsx
apps/webapp/app/components/runs/v3/RunTag.tsx
apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.test.tasks.$taskParam/route.tsx
`**/*.{ts,tsx}`: Always prefer using isomorphic code like fetch, ReadableStream,...
**/*.{ts,tsx}
: Always prefer using isomorphic code like fetch, ReadableStream, etc. instead of Node.js specific code
For TypeScript, we usually use types over interfaces
Avoid enums
Use strict mode
No default exports, use function declarations
📄 Source: CodeRabbit Inference Engine (.github/copilot-instructions.md)
List of files the instruction was applied to:
apps/webapp/app/components/primitives/Label.tsx
apps/webapp/app/presenters/v3/QueueRetrievePresenter.server.ts
apps/webapp/app/v3/models/workerDeployment.server.ts
apps/webapp/app/components/primitives/Select.tsx
apps/webapp/app/components/primitives/DurationPicker.tsx
apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.queues.ts
apps/webapp/app/v3/services/testTask.server.ts
apps/webapp/app/components/runs/v3/RunTagInput.tsx
apps/webapp/app/components/runs/v3/RunTag.tsx
apps/webapp/app/presenters/v3/QueueListPresenter.server.ts
apps/webapp/app/v3/testTask.ts
apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.test.tasks.$taskParam/route.tsx
apps/webapp/app/presenters/v3/TestTaskPresenter.server.ts
`{packages/core,apps/webapp}/**/*.{ts,tsx}`: We use zod a lot in packages/core and in the webapp
{packages/core,apps/webapp}/**/*.{ts,tsx}
: We use zod a lot in packages/core and in the webapp
📄 Source: CodeRabbit Inference Engine (.github/copilot-instructions.md)
List of files the instruction was applied to:
apps/webapp/app/components/primitives/Label.tsx
apps/webapp/app/presenters/v3/QueueRetrievePresenter.server.ts
apps/webapp/app/v3/models/workerDeployment.server.ts
apps/webapp/app/components/primitives/Select.tsx
apps/webapp/app/components/primitives/DurationPicker.tsx
apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.queues.ts
apps/webapp/app/v3/services/testTask.server.ts
apps/webapp/app/components/runs/v3/RunTagInput.tsx
apps/webapp/app/components/runs/v3/RunTag.tsx
apps/webapp/app/presenters/v3/QueueListPresenter.server.ts
apps/webapp/app/v3/testTask.ts
apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.test.tasks.$taskParam/route.tsx
apps/webapp/app/presenters/v3/TestTaskPresenter.server.ts
`apps/webapp/**/*.ts`: In the webapp, all environment variables must be accessed through the `env` export of `env.server.ts`, instead of directly accessing `process.env`.
apps/webapp/**/*.ts
: In the webapp, all environment variables must be accessed through theenv
export ofenv.server.ts
, instead of directly accessingprocess.env
.
📄 Source: CodeRabbit Inference Engine (.cursor/rules/webapp.mdc)
List of files the instruction was applied to:
apps/webapp/app/presenters/v3/QueueRetrievePresenter.server.ts
apps/webapp/app/v3/models/workerDeployment.server.ts
apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.queues.ts
apps/webapp/app/v3/services/testTask.server.ts
apps/webapp/app/presenters/v3/QueueListPresenter.server.ts
apps/webapp/app/v3/testTask.ts
apps/webapp/app/presenters/v3/TestTaskPresenter.server.ts
🧠 Learnings (11)
📓 Common learnings
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When using retry, queue, machine, or maxDuration options, configure them within the `task` function in Trigger.dev task files.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use the `metadata` API from `@trigger.dev/sdk/v3` to attach, update, and access structured metadata within task runs.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use the `runs` and `tasks` APIs from `@trigger.dev/sdk/v3` to subscribe to run updates and implement realtime features.
apps/webapp/app/v3/models/workerDeployment.server.ts (2)
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : ALWAYS generate Trigger.dev tasks using the `task` function from `@trigger.dev/sdk/v3` and NEVER use the deprecated `client.defineJob` pattern.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When using retry, queue, machine, or maxDuration options, configure them within the `task` function in Trigger.dev task files.
apps/webapp/app/components/primitives/Select.tsx (2)
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/*.tsx : When using React hooks for realtime updates, use `@trigger.dev/react-hooks` and provide a Public Access Token via context or props.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/webapp.mdc:0-0
Timestamp: 2025-06-30T13:21:59.438Z
Learning: Applies to apps/webapp/**/*.{ts,tsx} : When importing from `@trigger.dev/core` in the webapp, never import from the root `@trigger.dev/core` path; always use one of the subpath exports as defined in the package's package.json.
apps/webapp/app/components/primitives/DurationPicker.tsx (1)
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/*.tsx : When using React hooks for realtime updates, use `@trigger.dev/react-hooks` and provide a Public Access Token via context or props.
apps/webapp/app/v3/services/testTask.server.ts (13)
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When using retry, queue, machine, or maxDuration options, configure them within the `task` function in Trigger.dev task files.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Scheduled tasks must use `schedules.task` from `@trigger.dev/sdk/v3` and define a `cron` property for declarative schedules.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When implementing idempotency, use the `idempotencyKeys` API from `@trigger.dev/sdk/v3` and provide an `idempotencyKey` when triggering tasks.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When triggering a task from inside another task, use the task instance's `trigger`, `batchTrigger`, `triggerAndWait`, `batchTriggerAndWait`, `batch.trigger`, `batch.triggerAndWait`, `batch.triggerByTask`, or `batch.triggerByTaskAndWait` methods.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When triggering a task from backend code, use `tasks.trigger`, `tasks.batchTrigger`, or `tasks.triggerAndPoll` from `@trigger.dev/sdk/v3` and set the `TRIGGER_SECRET_KEY` environment variable.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : ALWAYS generate Trigger.dev tasks using the `task` function from `@trigger.dev/sdk/v3` and NEVER use the deprecated `client.defineJob` pattern.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Schema tasks must use `schemaTask` from `@trigger.dev/sdk/v3` and validate payloads using a schema (e.g., Zod).
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use the `metadata` API from `@trigger.dev/sdk/v3` to attach, update, and access structured metadata within task runs.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : If you are able to generate an example payload for a task, do so.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : You MUST use `@trigger.dev/sdk/v3` when writing Trigger.dev tasks.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : You MUST `export` every task, including subtasks, in Trigger.dev task files.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Before generating any code for Trigger.dev tasks, verify that you are importing from `@trigger.dev/sdk/v3`, exporting every task, and not generating any deprecated code patterns.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : The `run` function must contain the main logic for each Trigger.dev task.
apps/webapp/app/components/runs/v3/RunTagInput.tsx (4)
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/*.tsx : When using React hooks for realtime updates, use `@trigger.dev/react-hooks` and provide a Public Access Token via context or props.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use the `runs` and `tasks` APIs from `@trigger.dev/sdk/v3` to subscribe to run updates and implement realtime features.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use the `metadata` API from `@trigger.dev/sdk/v3` to attach, update, and access structured metadata within task runs.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : The `run` function must contain the main logic for each Trigger.dev task.
apps/webapp/app/components/runs/v3/RunTag.tsx (4)
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use the `runs` and `tasks` APIs from `@trigger.dev/sdk/v3` to subscribe to run updates and implement realtime features.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use the `metadata` API from `@trigger.dev/sdk/v3` to attach, update, and access structured metadata within task runs.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/*.tsx : When using React hooks for realtime updates, use `@trigger.dev/react-hooks` and provide a Public Access Token via context or props.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : The `run` function must contain the main logic for each Trigger.dev task.
apps/webapp/app/presenters/v3/QueueListPresenter.server.ts (2)
Learnt from: ericallam
PR: triggerdotdev/trigger.dev#2175
File: apps/webapp/app/services/environmentMetricsRepository.server.ts:202-207
Timestamp: 2025-06-14T08:07:46.625Z
Learning: In apps/webapp/app/services/environmentMetricsRepository.server.ts, the ClickHouse methods (getTaskActivity, getCurrentRunningStats, getAverageDurations) intentionally do not filter by the `tasks` parameter at the ClickHouse level, even though the tasks parameter is accepted by the public methods. This is done on purpose as there is not much benefit from adding that filtering at the ClickHouse layer.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When using retry, queue, machine, or maxDuration options, configure them within the `task` function in Trigger.dev task files.
apps/webapp/app/v3/testTask.ts (13)
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Schema tasks must use `schemaTask` from `@trigger.dev/sdk/v3` and validate payloads using a schema (e.g., Zod).
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When using retry, queue, machine, or maxDuration options, configure them within the `task` function in Trigger.dev task files.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Scheduled tasks must use `schedules.task` from `@trigger.dev/sdk/v3` and define a `cron` property for declarative schedules.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When implementing idempotency, use the `idempotencyKeys` API from `@trigger.dev/sdk/v3` and provide an `idempotencyKey` when triggering tasks.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use the `metadata` API from `@trigger.dev/sdk/v3` to attach, update, and access structured metadata within task runs.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : ALWAYS generate Trigger.dev tasks using the `task` function from `@trigger.dev/sdk/v3` and NEVER use the deprecated `client.defineJob` pattern.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : If you are able to generate an example payload for a task, do so.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : You MUST use `@trigger.dev/sdk/v3` when writing Trigger.dev tasks.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Lifecycle hooks (`init`, `cleanup`, `onStart`, `onSuccess`, `onFailure`, `handleError`) must be defined as properties of the `task` function in Trigger.dev task files.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/webapp.mdc:0-0
Timestamp: 2025-06-30T13:21:59.438Z
Learning: Applies to apps/webapp/app/**/*.test.{ts,tsx} : Tests should only import classes and functions from files matching `app/**/*.ts` of the webapp, and those files should not use environment variables; everything should be passed through as options instead.
Learnt from: nicktrn
PR: triggerdotdev/trigger.dev#1608
File: apps/webapp/app/v3/services/triggerTask.server.ts:418-418
Timestamp: 2025-01-13T18:31:48.160Z
Learning: The `MachinePresetName` schema is used to validate machine preset values in the trigger.dev codebase, ensuring type safety and validation of machine preset options.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Before generating any code for Trigger.dev tasks, verify that you are importing from `@trigger.dev/sdk/v3`, exporting every task, and not generating any deprecated code patterns.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : You MUST `export` every task, including subtasks, in Trigger.dev task files.
apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.test.tasks.$taskParam/route.tsx (13)
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Scheduled tasks must use `schedules.task` from `@trigger.dev/sdk/v3` and define a `cron` property for declarative schedules.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When using retry, queue, machine, or maxDuration options, configure them within the `task` function in Trigger.dev task files.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : If you are able to generate an example payload for a task, do so.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use the `runs` and `tasks` APIs from `@trigger.dev/sdk/v3` to subscribe to run updates and implement realtime features.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When triggering a task from inside another task, use the task instance's `trigger`, `batchTrigger`, `triggerAndWait`, `batchTriggerAndWait`, `batch.trigger`, `batch.triggerAndWait`, `batch.triggerByTask`, or `batch.triggerByTaskAndWait` methods.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Schema tasks must use `schemaTask` from `@trigger.dev/sdk/v3` and validate payloads using a schema (e.g., Zod).
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Lifecycle hooks (`init`, `cleanup`, `onStart`, `onSuccess`, `onFailure`, `handleError`) must be defined as properties of the `task` function in Trigger.dev task files.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use the `metadata` API from `@trigger.dev/sdk/v3` to attach, update, and access structured metadata within task runs.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : ALWAYS generate Trigger.dev tasks using the `task` function from `@trigger.dev/sdk/v3` and NEVER use the deprecated `client.defineJob` pattern.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : The `run` function must contain the main logic for each Trigger.dev task.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/*.tsx : When using React hooks for realtime updates, use `@trigger.dev/react-hooks` and provide a Public Access Token via context or props.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : You MUST use `@trigger.dev/sdk/v3` when writing Trigger.dev tasks.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When triggering a task from backend code, use `tasks.trigger`, `tasks.batchTrigger`, or `tasks.triggerAndPoll` from `@trigger.dev/sdk/v3` and set the `TRIGGER_SECRET_KEY` environment variable.
apps/webapp/app/presenters/v3/TestTaskPresenter.server.ts (16)
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Scheduled tasks must use `schedules.task` from `@trigger.dev/sdk/v3` and define a `cron` property for declarative schedules.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When using retry, queue, machine, or maxDuration options, configure them within the `task` function in Trigger.dev task files.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use the `runs` and `tasks` APIs from `@trigger.dev/sdk/v3` to subscribe to run updates and implement realtime features.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : ALWAYS generate Trigger.dev tasks using the `task` function from `@trigger.dev/sdk/v3` and NEVER use the deprecated `client.defineJob` pattern.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use the `metadata` API from `@trigger.dev/sdk/v3` to attach, update, and access structured metadata within task runs.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When triggering a task from inside another task, use the task instance's `trigger`, `batchTrigger`, `triggerAndWait`, `batchTriggerAndWait`, `batch.trigger`, `batch.triggerAndWait`, `batch.triggerByTask`, or `batch.triggerByTaskAndWait` methods.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : The `run` function must contain the main logic for each Trigger.dev task.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/webapp.mdc:0-0
Timestamp: 2025-06-30T13:21:59.438Z
Learning: Applies to apps/webapp/app/**/*.test.{ts,tsx} : Tests should only import classes and functions from files matching `app/**/*.ts` of the webapp, and those files should not use environment variables; everything should be passed through as options instead.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Before generating any code for Trigger.dev tasks, verify that you are importing from `@trigger.dev/sdk/v3`, exporting every task, and not generating any deprecated code patterns.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : If you are able to generate an example payload for a task, do so.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : When triggering a task from backend code, use `tasks.trigger`, `tasks.batchTrigger`, or `tasks.triggerAndPoll` from `@trigger.dev/sdk/v3` and set the `TRIGGER_SECRET_KEY` environment variable.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-06-30T13:21:33.994Z
Learning: Applies to internal-packages/database/**/*.{ts,tsx} : We use prisma in internal-packages/database for our database interactions using PostgreSQL
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Schema tasks must use `schemaTask` from `@trigger.dev/sdk/v3` and validate payloads using a schema (e.g., Zod).
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : You MUST NEVER use `client.defineJob` in Trigger.dev task files, as it is deprecated and will break the application.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : You MUST use `@trigger.dev/sdk/v3` when writing Trigger.dev tasks.
Learnt from: CR
PR: triggerdotdev/trigger.dev#0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-06-30T13:22:21.528Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : You MUST `export` every task, including subtasks, in Trigger.dev task files.
🧬 Code Graph Analysis (1)
apps/webapp/app/v3/testTask.ts (1)
packages/core/src/v3/schemas/common.ts (2)
MachinePresetName
(97-105)MachinePresetName
(107-107)
🪛 Biome (1.9.4)
apps/webapp/app/presenters/v3/TestTaskPresenter.server.ts
[error] 250-250: Other switch clauses can erroneously access this declaration.
Wrap the declaration in a block to restrict its access to the switch clause.
The declaration is defined in this switch clause:
Unsafe fix: Wrap the declaration in a block.
(lint/correctness/noSwitchDeclarations)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (7, 10)
🔇 Additional comments (44)
apps/webapp/app/presenters/v3/QueueRetrievePresenter.server.ts (1)
85-94
: LGTM! Good code reuse pattern.Exporting the
queueTypeFromType
function enables proper code reuse across modules while maintaining type safety with exhaustive checking.apps/webapp/app/components/primitives/Label.tsx (1)
7-7
: LGTM! Consistent UI refinement.The font size adjustment from
text-sm
(14px) totext-[0.8125rem]
(13px) aligns with the overall UI improvements in this PR.apps/webapp/app/v3/models/workerDeployment.server.ts (1)
57-57
: LGTM! Necessary data model extension.Adding
queueId
to the worker task selection supports the new queue functionality while maintaining consistency with existing queue-related fields.apps/webapp/app/components/primitives/Select.tsx (2)
330-330
: LGTM! Fix ensures proper disabled state handling.Explicitly passing the
disabled
prop to the underlying Ariakit.Select component ensures consistent disabled behavior and proper accessibility.
619-619
: LGTM! Refined popover width calculation.Removing the extra
0.5rem
offset from the min-width calculation allows the popover to match the anchor width more precisely, improving visual alignment.apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.queues.ts (2)
9-14
: LGTM! Well-structured parameter validation.The SearchParamsSchema properly validates all query parameters with appropriate types and defaults, including the new queue type filter.
16-70
: LGTM! Comprehensive loader implementation.The loader properly handles:
- User authentication with
requireUserId
- Parameter validation using Zod schemas
- Error handling for missing resources
- Graceful fallback for presenter failures
- Consistent response structure with pagination and filtering
apps/webapp/app/components/runs/v3/RunTagInput.tsx (6)
6-16
: Well-structured interface with comprehensive prop support.The
TagInputProps
interface provides good flexibility with both controlled and uncontrolled usage patterns, proper form integration props, and sensible defaults.
29-40
: Proper controlled/uncontrolled component pattern implementation.The state initialization and synchronization with external controlled tags is correctly implemented using
useEffect
to handle external state changes.
42-53
: Solid tag addition logic with proper validation.The
addTag
function correctly handles trimming, duplicate prevention, and max tag limits. The callback pattern is well-implemented.
64-76
: Comprehensive keyboard event handling.The keyboard event handling supports Enter for adding tags, Backspace for removing the last tag, and prevents comma input. The logic is well-structured.
95-130
: Excellent animation implementation with proper accessibility.The framer-motion animations are well-configured with appropriate spring physics and exit animations. The
AnimatePresence
withmode="popLayout"
ensures smooth transitions.
82-82
: Proper form integration with hidden input.The hidden input correctly joins tags with commas for form submission, ensuring proper integration with form frameworks.
apps/webapp/app/v3/services/testTask.server.ts (5)
2-3
: Good use of type-only imports.The conversion to type-only imports follows TypeScript best practices and reduces bundle size.
18-30
: Comprehensive options mapping for STANDARD trigger.The options object properly maps all the new test task parameters. The delay calculation and TTL formatting are correctly implemented.
53-68
: Consistent options mapping for SCHEDULED trigger.The scheduled trigger options maintain the same comprehensive mapping as the standard trigger, ensuring feature parity.
21-23
: Proper idempotency TTL formatting.The conditional formatting of
idempotencyKeyTTL
with the seconds suffix follows the expected API format.
30-30
: Correct version handling logic.The conditional logic for
lockToVersion
properly handles the "latest" case by setting it toundefined
, which is the expected behavior.apps/webapp/app/components/runs/v3/RunTag.tsx (5)
6-6
: Proper import addition for delete icon.The XIcon import is correctly added to support the delete button functionality.
14-20
: Well-designed action prop with type safety.The action prop uses discriminated unions for type safety, allowing either copy or delete actions with appropriate callbacks.
70-74
: Clean conditional rendering logic.The conditional rendering based on action type is straightforward and maintainable.
122-159
: Consistent DeleteButton implementation.The DeleteButton component follows the same pattern as CopyButton with proper event handling, styling, and tooltip. The rose color on hover provides good visual feedback for the destructive action.
131-138
: Proper event handling for delete action.The event handling correctly prevents propagation and calls the onDelete callback with the tag value.
apps/webapp/app/components/primitives/DurationPicker.tsx (8)
6-14
: Well-structured interface with comprehensive props.The
DurationPickerProps
interface provides good flexibility with controlled/uncontrolled patterns and proper form integration.
27-33
: Proper duration calculation and state initialization.The time unit calculations correctly break down total seconds into hours, minutes, and seconds components.
44-58
: Robust state synchronization with controlled values.The useEffect properly handles external value changes and prevents infinite loops by checking if the controlled value differs from the current total.
65-92
: Excellent overflow handling logic.The minutes and seconds change handlers properly handle overflow by cascading to the next higher unit. The logic correctly handles edge cases like 75 seconds converting to 1 minute 15 seconds.
94-116
: Intuitive keyboard navigation implementation.The arrow key navigation between fields provides a good user experience. The Tab key is properly excluded from custom handling to maintain normal tab navigation.
131-145
: Proper input configuration for numeric fields.The Input components are correctly configured with numeric input mode, proper min/max constraints, and selection on focus for better UX.
134-137
: Good styling approach with conditional dimming.The conditional styling for empty state provides good visual feedback to users.
127-127
: Proper form integration with hidden input.The hidden input correctly stores the total seconds value for form submission.
apps/webapp/app/presenters/v3/QueueListPresenter.server.ts (7)
6-6
: Proper import addition for database enum.The TaskQueueType import is correctly added to support the new type filtering functionality.
11-14
: Clear type mapping with appropriate naming.The
typeToDBQueueType
mapping clearly translates user-friendly type names to database enum values. The mapping is intuitive: "task" → VIRTUAL, "custom" → NAMED.
28-35
: Consistent method signature extension.The method signature properly extends to include the optional type parameter while maintaining backward compatibility.
36-36
: Proper filter detection logic.The
hasFilters
calculation correctly includes the type parameter to determine if any filters are applied.
49-49
: Correct database query filtering.The database query properly applies the type filter using the mapping when the type parameter is provided.
97-99
: Consistent private method signature update.The private method signature is correctly updated to accept the type parameter and maintain consistency with the public method.
110-110
: Consistent filtering in pagination method.The pagination method applies the same type filtering logic as the count query, ensuring consistency.
apps/webapp/app/v3/testTask.ts (2)
2-2
: LGTM!The import correctly uses the subpath export from
@trigger.dev/core/v3/schemas
as required by the coding guidelines.
85-102
: Well-implemented tags validation!The tags field properly handles comma-separated input with appropriate constraints:
- Transforms string to array with trimming and filtering
- Limits to 10 tags maximum
- Enforces 128 character limit per tag
This provides a good balance between flexibility and preventing abuse.
apps/webapp/app/presenters/v3/TestTaskPresenter.server.ts (2)
112-126
: LGTM! Environment-specific task retrieval logic.The conditional logic appropriately handles different environments:
- Non-development: Uses current worker deployment
- Development: Queries database directly
This ensures proper task resolution based on the environment context.
64-82
: RawRun type changes align with the database schema
- The SQL projection in TestTaskPresenter (
SELECT taskr."queue", …, taskr."runTags"
) matches the newqueue: string
andrunTags: string[]
fields.- The
runTags
column is non‐nullable (TEXT[] in Postgres, mapped tostring[]
in Prisma) and has been backfilled, so making it mandatory is safe.- The removed
number
field was neither selected in the query nor referenced in this presenter or its UI routes, so its removal will not break existing code.No further changes are needed here.
apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.test.tasks.$taskParam/route.tsx (2)
323-338
: Good use of fetcher and refs for form submission!The implementation correctly:
- Uses refs to avoid unnecessary re-renders from JSON editor changes
- Leverages fetcher.submit for better control over submission
- Sets form data values from refs just before submission
This approach provides good performance characteristics for forms with frequently changing JSON editors.
224-227
: Excellent TypeScript exhaustiveness check!Good use of the
satisfies never
pattern in the default case to ensure alltriggerSource
types are handled at compile time.
Changes in this PR: